<template>
	<view class="popupBody">
		<view class="title">
			物流跟踪
		</view>
		<view class="shipped_line"></view>
		<view class="heander2">
			<image src="https://ykp-new.oss-cn-hangzhou.aliyuncs.com/0fx/daifahuo%403x.png"></image>
			<view class="heander2_r">
				<view class="heander2_r_t">
					快递单号：{{logData.delivery_no}}
					<image class="copybutton" :src="imageUrl+'copy.png'"  @tap="copyOrder(logData.delivery_no)" mode="aspectFit"></image>
				</view>
				<view class="heander2_r_b">
					收货地址：{{logData.address}}
				</view>
			</view>
		</view>
		<view class="shipped_line"></view>
		<view class="logistics_body" v-if="list.length>0">
			<scroll-view scroll-y style="max-height: 550rpx;">
				<u-steps :current="list.length" direction="column" dot activeColor="#8159F6">
					<u-steps-item v-for="(item,index) in list" :key="index">
						<view slot="desc" class="desc">
							<view class="descT">
								{{item.status}}
							</view>
							<view class="descB">
								{{item.time}}
							</view>
						</view>
					</u-steps-item>
				</u-steps>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ["logData", "list","imageUrl"],
		data() {
			return {};
		},
		methods: {
			copyOrder(item) {
				uni.setClipboardData({
					data: item, //要被复制的内容
					success: () => { //复制成功的回调函数
						this.toast('复制成功')
					}
				});
			}
		},
	};
</script>

<style lang="less" scoped>
	.popupBody {
		max-height: 872rpx;
		background-color: #FFFFFF;
		border-radius: 40rpx 40rpx 0rpx 0rpx;
		padding: 30rpx;
		.shipped_line{
			width: 100%;
			height: 1rpx;
			background-color: #F9F9F9;
			margin-top: 30rpx;
		}
		.title {
			font-size: 32rpx;
			text-align: center;
		}

		.heander {
			margin-top: 30rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			display: flex;
			align-items: center;
			padding: 30rpx 20rpx;

			.logistics_name {
				font-size: 28rpx;
				color: #509F78;
			}

			.logistics_num {
				font-size: 28rpx;
				color: #000000;
			}
		}

		.heander2 {
			margin-top: 20rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			display: flex;
			align-items: center;
			padding: 30rpx 20rpx;
			display: flex;
			align-items: center;
			position: relative;

			image {
				width: 44rpx;
				height: 38rpx;
			}

			.heander2_r {
				margin-left: 20rpx;
				display: flex;
				flex-direction: column;
				align-items: flex-start;
				font-size: 28rpx;

				.heander2_r_t {
					display: flex;
					align-items: center;

					.copybutton {
						position: absolute;
						right: 20rpx;
						top: 30rpx;
						width: 72rpx;
						border-radius: 6rpx;
						color: #777777;
						text-align: center;
						padding: 2rpx 0;
					}
				}

				.heander2_r_b {
					margin-top: 10rpx;
				}
			}
		}

		.logistics_body {
			margin-top: 30rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			display: flex;
			align-items: center;
			padding: 30rpx 20rpx;
		}
	}

	/deep/.u-steps-item--column {
		padding-bottom: 40rpx;
	}

	// /deep/.u-steps-item__line u-steps-item__line--column{
	// 	height: 0rpx !important;
	// }
	.descT {
		word-wrap: break-word;
		width: 590rpx;
		font-size: 28rpx;
		line-height: 45rpx;
		color: #000000;
	}

	.descB {
		font-size: 24rpx;
		line-height: 45rpx;
		color: #999999;
	}
</style>